<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:90:"/www/wwwroot/schoolnx.nxers.com/public/../application/admin/view/exam/questionsSelect.html";i:1582090026;s:66:"/www/wwwroot/schoolnx.nxers.com/application/admin/view/iframe.html";i:1583476352;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理系统</title>
    <link rel="stylesheet" href="/static/libs/layui/css/layui.css">
    <link rel="stylesheet" href="/static/default/css/base.css">
    <link rel="stylesheet" href="/static/default/css/fonts.css">
    
</head>
<body class="layui-layout-iframe">

<div class="layui-card">
    <div class="layui-card-body">
        <table class="layui-table layui-form">
            <thead>
            <tr>
                <th style="width:20px;"><input type="checkbox" disabled lay-skin="primary"></th>
                <th style="width:20px;">ID</th>
                <th style="width:60px;">试题类型</th>
                <th >试题内容</th>
                <th  style="width:30px;">难度</th>
                <th  style="width:30px;">预览</th>
            </tr>
            </thead>
            <tbody>
            <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): if( count($list)==0 ) : echo "$empty" ;else: foreach($list as $key=>$v): ?>
            <tr>
                <td><input type="checkbox" name="ids[]" typeid="<?php echo $v['questiontype']; ?>" value="<?php echo $v['id']; ?>" lay-filter="exam" lay-skin="primary"></td>
                <td><?php echo $v['id']; ?></td>
                <td><?php echo get_question_type($v['questiontype']); ?></td>
                <td><?php echo $v['question']; ?></td>
                <td><?php echo get_question_level($v['questionlevel']); ?></td>
                <td><a href="<?php echo url('admin/exam/questionsPreview', ['id' => $v['id'],'NoBtn'=>1]); ?>" class="layui-btn  layui-btn-warm layui-btn-xs ajax-iframe" data-width="760px" data-height="380px"> <i class="layui-icon">&#xe705;</i></a></td>
            </tr>
            <?php endforeach; endif; else: echo "$empty" ;endif; ?>
            </tbody>
            <input type="hidden" value="<?php echo $questiontype; ?>" id="inputquestiontype">
        </table>
        <div class="page"><?php echo $list->render(); ?></div>
    </div>
</div>

<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/libs/common/jquery.min.js"></script>
<script src="/static/libs/common/common.js"></script>
<script src="https://cdn.bootcss.com/stickyNavbar.js/1.3.5/jquery.stickyNavbar.min.js"></script>

<script type="text/javascript">
    layui.use('layer', function(){
        var questiontype=$("#inputquestiontype").val();
        var selected=parent.$('#iselectquestions_'+questiontype).val();
        $("[name='ids[]']").each(function(){if(selected.indexOf(','+$(this).val()+',') >= 0)$(this).attr('checked','checked');});
        form.render('checkbox');
    });
</script>

</body>
</html>
